import { EntityModel } from '@midwayjs/orm';
import { Column, PrimaryGeneratedColumn } from 'typeorm';
import { BaseEntity } from '@cool-midway/core';

@EntityModel('user_relation')
export class UserRelationEntity extends BaseEntity {
  @PrimaryGeneratedColumn({
    name: 'id',
    comment: 'user.user_id',
  })
  id: number;

  @Column({
    name: 'user_id',
    comment: 'user.user_id',
  })
  userId: number;

  @Column({
    comment: 'user.id',
    name: 'parent_id',
  })
  parentId: number;

  @Column('varchar', {
    comment: 'path',
    name: 'path',
  })
  path: string;
}
